﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Ribbon_Ribbon_FileMenu : System.Web.UI.UserControl
{
    private System.Collections.Generic.List<Control> _Items;

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public System.Collections.Generic.List<Control> ContentTemplate
    {
        get { return _Items; }
        set { _Items = value; }
    }

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        if (_Items != null)
        {
            foreach (Control obj in _Items)
            {
                this.PlaceHolder_items.Controls.Add(obj);
            }
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this.FileMenu.Attributes.Add("onmouseover", "SBRibbon.KeepMenu('" + this.FileMenu.ClientID + "')");
        this.FileMenu.Attributes.Add("onmouseout", "SBRibbon.HideMenu('" + this.FileMenu.ClientID + "')");    
    }
}
